﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GenericTypeTea;

namespace GWinMap.Examples
{
    public partial class fBasic : Form
    {
        public fBasic()
        {
            InitializeComponent();
        }

        private void btnInitialise_Click(object sender, EventArgs e)
        {
            gWinMap1.Initialise("ABQIAAAAsGkSFjOoM1WymPFvBxbTshSweR9SvCysqdGzNf6RBGnsyySNhRS_Yi__rxQ-AOe1IoS4II2-bktmMA", false);
        }

        private void btnSetCenter_Click(object sender, EventArgs e)
        {
            
            int zoomLevel = 13;
            double latitude = double.Parse(textBox1.Text);
            double longitude = double.Parse(textBox2.Text);

            GWinLatLng centerPoint = new GWinLatLng(latitude, longitude);
            gWinMap1.SetCenter(centerPoint, zoomLevel);

        }

        private void btnClear_Click(object sender, EventArgs e)
        {
            gWinMap1.Clear();
        }

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            gWinMap1.Generate();
        }

    }
}
